<template>
    <div class="{{name}}Container">
        <el-row>
            <el-button type="primary" size="mini">新键</el-button>
            <el-button type="danger" size="mini">删除</el-button>
        </el-row>
        <el-table
            @selection-change="selectTable"
            border
            v-loading="loading"
            :data="tableData"
            stripe
            style="width: 100%"
        >
            <el-table-column type="index" width="50" label="序号" />
            <el-table-column type="selection" width="55" />
            {{#each cols}}
            <el-table-column prop="{{this.key}}" label="{{this.label}}" width="180">
            </el-table-column>
            {{/each}}
            <el-table-column fixed="right" label="操作" width="250">
                <template slot-scope="scope">
                    <el-button @click="showEdit(scope.row)" type="primary" size="mini"
                        >查看</el-button
                    >
                    {{#if isDel}}
                    <el-button type="danger" size="mini" @click="delete{{Api}}(scope.row)"
                        >删除</el-button
                    >
                    {{/if}}
                </template>
            </el-table-column>
        </el-table>
    </div>
</template>

<script setup lang="ts" name="{{name}}">
import { getCurrentInstance, ref, reactive, onMounted } from "vue";
import { useRouter } from "vue-router";

const {
    proxy: { $Urls, $Request, $Modal },
} = getCurrentInstance() as any;

const router = useRouter();

defineExpose({});

onMounted(() => {});
</script>

<style lang="scss" scoped>
@import "./index.scss";
</style>
